<template>
    <van-cell-group class="wait_pay">
      <van-row justify="center">
        <van-col span="10" class="title">
          <span class="h2"
            >下单成功
            <van-tag plain type="primary" color="#D9D9D9" text-color="#505050">
              <van-image
                width=".35rem"
                src="@/../public/cartImg/completeOrder/图标 147.svg"
              />
              慢必赔
            </van-tag>
          </span>
        </van-col>
      </van-row>
      <van-row justify="center">
        <van-col class="text_all">
          <span class="text">
            预计
            <span class="time">4:52</span>
            送达,请耐心等待luckin来临!
          </span>
        </van-col>
      </van-row>
      <van-row justify="center">
        <van-col>
          <span class="btn">
            <van-button
              type="default"
              class="btn1"
              plain
              size="small"
              @click="cancelOrder"
              >取消订单</van-button
            >
            <van-button
              type="primary"
              class="btn2"
              plain
              size="small"
              @click="goMealcode"
              >取餐码</van-button
            >
          </span>
        </van-col>
      </van-row>
    </van-cell-group>
</template>

<script setup>
// 引入hooks
import { usePayComplete } from "@/hooks/cart/useCart";
const { orderData, onClickLeft, cancelOrder, gopay, goMealcode } = usePayComplete();

</script>

<style lang="scss" scoped>
// wait pay card
.wait_pay {
  .title {
    margin-bottom: 0.1rem;
    .h2 {
      font-size: 0.55rem;
      font-weight: bolder;
      margin-top: 0.5rem;
      display: block;
      position: relative;
      .van-tag {
        position: absolute;
        right: 0.1rem;
        top: 0.1rem;
        padding: 0.05rem;
        padding-left: 0.1rem;
        padding-right: 0.1rem;

        .van-image {
          margin-right: 0.03rem;
        }
      }
    }
  }
  .text_all {
    margin-bottom: 0.2rem;
  }
  .text {
    font-size: 0.4rem;
  }
  .time {
    color: rgba(144, 192, 239, 1);
  }
  .btn {
    display: block;
    margin-bottom: 0.5rem;
    text-align: center;
    .van-button {
      width: 2.6rem;
      margin-right: 0.4rem;
    }
  }
}
</style>